<template>
  <div class="risk">
    <eagle-page-list
      :controller="controller"
      :queryParams="queryParams"
      @bindData="bindData"
      :conditions="conditions"
      ref="eaglePageList"
    >
      <template #list>
        <eagle-cell
           style="margin-top: 10px"
          class="br-8"
          v-for="(item, index) in list"
          :key="index"
          :title="item.Title"
          @click="goDetail(item)"
        >
          <template #label>
              <div>{{ item.Remarks }}</div>
            </template>
        </eagle-cell>
      </template>
    </eagle-page-list>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      conditions: {},
      controller: "/DangerTemplate",
      queryParams: {
          dataType: "RiskDeptList",
      },
      isJG:false
    };
  },
  created() {
    this.isJG= this.$store.state.CompanyType=='JG'
  },
  methods: {
    bindData(data) {
      this.list = [];
      if (data) {
        this.list = data;
      }
    },
    goDetail(item) {
      let url = this.isJG?"/Danger/DangerTemplateDetailJG":"/Danger/DangerTemplateDetail"
      this.$router.push({
        path: url,
        query: { tCode: item.TCode },
      });
    },
  },
};
</script>

<style lang="less" scoped>
.risk {
  height: 100vh;
  background-color: #e8f1f8;
  .info_search {
    padding: 10px;
    border-radius: 5px !important;
    .van-field__control {
      background-color: #ffffff !important;
    }
  }
}
.all_dep {
  background-color: #ffffff;
}
.warn_item {
  padding: 10px;
  border-radius: 5px;
  position: relative;
}
.warn_header {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 10px;
  .warn_tag {
    position: absolute;
    right: 0;
    top: 0;
    border-radius: 26.64rem 0 0 26.64rem;
  }
}
.dep_sort {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  img {
    height: 15px;
    width: 15px;
    margin-right: 5px;
  }
}

.btm_item {
  display: flex;
  align-items: center;
  img {
    height: 15px;
    width: 15px;
    margin-right: 5px;
  }
}
.dep_item {
  width: 100%;
  padding: 10px;
  background-color: #e8f1f8;
}
.dep_item_detail {
  /* margin: 10px;*/
  padding: 10px;
  border-radius: 5px;
  background-color: #ffffff;
  position: relative;
  margin-bottom: 10px;
  /* border-bottom: 1px solid #e8f1f8;*/
  .dep_name {
    font-size: 16px;
    margin-bottom: 10px;
  }
  .dep_sort {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    img {
      height: 15px;
      width: 15px;
      margin-right: 5px;
    }
  }
  .dep_btm {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    .btm_item {
      display: flex;
      align-items: center;
      img {
        height: 15px;
        width: 15px;
        margin-right: 5px;
      }
    }
  }
}

.tags {
  position: absolute;
  right: 0;
  top: 0;
  border-radius: 26.64rem 0 0 26.64rem;
}

.van-divider {
  margin: 0px;
  margin-top: 5px;
  margin-bottom: 5px;
}
</style>
